<html>
    <head>
        <title><g:layoutTitle default="Grails" /></title>
        
        <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
        <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        
        
        <g:javascript library="prototype"/>
        <g:javascript library="jquery"/>
        <g:javascript> var $j = jQuery.noConflict();</g:javascript>
        <g:javascript library="roundedCorners/jquery.corner"/>
   		<!--[if IE]><g:javascript library="roundedCorners/excanvas.pack.js"/><![endif]-->
   		
   		<resource:richTextEditor type="advanced"/>
        <g:javascript library="application" />
        
        <g:layoutHead />
    </head>
    
    <body>
	    <div class="header">
	        <g:if test="${controllerName != 'autenticate'}">
		        <g:if test="${session.user == null}">
		        	<g:link class="rightLink" controller="user" action="create">REGISTER</g:link>
		       		<g:link class="rightLink" controller="autenticate" action="show">LOGIN</g:link>
		        </g:if>
		        <g:else>
		        	<g:link class="rightLink" controller="user" action="show" params="${[id:session.user.id]}">YOUR PROFILE</g:link>
		        	<g:link class="rightLink" controller="autenticate" action="logout">LOGOUT</g:link>
		        </g:else>
	        </g:if>
        </div>
        
        <div class="body roundedCorners">
	        <g:layoutBody />
	        
	        <div class="nav">
	            <span class="menuButton">QUE SOM</span>
    		    <span class="menuButton">QUI SOM</span>
    		    <span class="menuButton">NORMAS D'US</span>
	        </div>
        </div>
        
        <g:hiddenField name="action" value="${actionName}"/>
    </body>
</html>